import 'package:dk_flutter_base/dk_ui.dart';

class ToolsEditDialog extends Dialog {
  final String message;
  final Function onCloseEvent;

  ToolsEditDialog({this.message, this.onCloseEvent});
  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: () {
        Navigator.pop(context);
      },
      child: Material(
        type: MaterialType.transparency,
        child: Center(
          child: Container(
            width: 241,
            height: 155,
            child: Container(
              decoration: BoxDecoration(
                color: Colors.white,
                borderRadius: BorderRadius.circular(5),
              ),
              child: Column(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                children: <Widget>[
                  Container(
                      alignment: Alignment.center,
                      padding: EdgeInsets.only(top: 34),
                      child: Text(message,
                          textAlign: TextAlign.center,
                          style: TextStyle(
                            color: Color(0xff333333),
                            fontSize: 16,
                          ))),
                  SizedBox(
                    height: 30,
                  ),
                  DkDivider(DividerOption.horizontal(height: 0.5)),
                  Expanded(
                    child: Center(
                      child: GestureDetector(
                        child: DkText.simple(
                          '知道了',
                          16,
                          Color(0xff3274F9),
                          fontWeight: FontWeight.normal,
                        ),
                        onTap: onCloseEvent,
                      ),
                    ),
                  ),
                ],
              ),
            ),
          ),
        ),
      ),
    );
  }
}
